-
Notifications
You must be signed in to change notification settings - Fork 786
[SYCL][L0] Fix absence of zeInit in Level Zero LIT e2e tests #18956
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: sycl
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just replace return 1
in interop-thread with assert or something like that
// Initialize Level Zero driver is required if this test is linked | ||
// statically with Level Zero loader, the driver will not be init otherwise. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
small nit here and below in other tests:
// Initialize Level Zero driver is required if this test is linked | |
// statically with Level Zero loader, the driver will not be init otherwise. | |
// Initializing Level Zero driver is required if this test is linked | |
// statically with Level Zero loader, otherwise the driver will not be initialized. |
// statically with Level Zero loader, the driver will not be init otherwise. | ||
ze_result_t result = zeInit(ZE_INIT_FLAG_GPU_ONLY); | ||
if (result != ZE_RESULT_SUCCESS) { | ||
std::cout << "zeInit failed\n"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test use asserts, so to align with it:
std::cout << "zeInit failed\n"; | |
assert((result == ZE_RESULT_SUCCESS) && "zeInit failed"); |
// statically with Level Zero loader, the driver will not be init otherwise. | ||
ze_result_t result = zeInit(ZE_INIT_FLAG_GPU_ONLY); | ||
if (result != ZE_RESULT_SUCCESS) { | ||
std::cout << "zeInit failed\n"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit here and in other tests below:
std::cout << "zeInit failed\n"; | |
std::cerr << "zeInit failed" << std::endl; | |
if (result != ZE_RESULT_SUCCESS) { | ||
std::cout << "zeInit failed\n"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better to use assert
here as it is already used in this test
ze_result_t result = zeInit(ZE_INIT_FLAG_GPU_ONLY); | ||
if (result != ZE_RESULT_SUCCESS) { | ||
std::cout << "zeInit failed\n"; | ||
return 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+ some small enhancement here and below:
return 1; | |
return result; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ZE_RESULT_SUCCESS is not equal to test's success return code. May be in current implementation both of them are equal 0, but not in general.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe print this result
value to output for the future easier debugging session, or return it in other way?
No description provided.